package sbc.group1.lab1.alt;

import java.rmi.RemoteException;

import sbc.group1.lab1.common.Engine;

public class EngineProducer extends AbstractProducer {
    private final Engine.Type type;
	public EngineProducer(int id, int partsToProduce, CarService cs,  Engine.Type type, double relaticeDefects) {
		super(id, partsToProduce, cs, relaticeDefects);
		this.type=type;
	}

	@Override
	protected void createAndAddPart(CarService cs) throws RemoteException,
			InterruptedException {
		cs.addEngine(new Engine(this,type, randomIsDefect()));
	}

}
